﻿using RSModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RSFrame.Services
{
    public interface ICompanyService
    {
        /// <summary>
        /// 获取所有通过认证的公司
        /// </summary>
        List<Company> AllAuthorizedCompanies { get; }
        /// <summary>
        /// 获取垃圾运输公司
        /// </summary>
        List<Company> TransportationCompanies { get; }
        /// <summary>
        /// 获取垃圾处理公司
        /// </summary>
        List<Company> TreatmentCompanies { get; }
        /// <summary>
        /// 获取垃圾中转站
        /// </summary>
        List<Company> TransferCompanies { get; }
        /// <summary>
        /// 取消公司认证
        /// </summary>
        /// <param name="companyID">公司ID</param>
        /// <param name="userAccount">操作者账号</param>
        /// <param name="Password">操作者密码</param>
        /// <returns>删除成功返回true，否则返回false</returns>
        bool DeleteCompany(int companyID, int userAccount, string Password);
        /// <summary>
        /// 添加认证公司
        /// </summary>
        /// <param name="name">要认证的公司名称</param>
        /// <param name="des">要认证的公司描述</param>
        /// <param name="type">要认证的公司类型</param>
        /// <param name="userAccount">操作者账号</param>
        /// <param name="Password">操作者密码</param>
        /// <returns>若添加成功则返回公司ID，否则返回null</returns>
        int? AddCompany(string name, string des, int type, float lng, float lat, int userAccount, string Password);
        /// <summary>
        /// 修改公司信息
        /// </summary>
        /// <param name="companyID">要修改的公司ID</param>
        /// <param name="newCompanyInfo">含有新信息的对象</param>
        /// <returns>若修改成功返回true，否则返回false</returns>
        bool EditCompany(int companyID, Company newCompanyInfo);
        /// <summary>
        /// 根据ID查询公司
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns>查询结果</returns>
        List<Company> SearchCompanyByID(int id);
        /// <summary>
        /// 根据名称查询公司
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <returns>查询结果</returns>
        List<Company> SearchCompanyByName(string keyword);
    }
}
